<?php

/**
 * gfPhoneNumberValidator form.
 *
 * @package    docplus.co.za
 * @subpackage form
 * @author     Fox Matuku
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class gfPhoneNumberValidator extends sfValidatorRegex
{
	const REGEX_PHONE = '/^(\+?27|0)[1-9][1-9][0-9]{7}$/';

	/**
	 * @see sfValidatorRegex
	 */
	protected function configure($options = array(), $messages = array())
	{
		parent::configure($options, $messages);

		$this->setOption('pattern', self::REGEX_PHONE);
	}

}